#ifndef SECURE_TRANSFER_H
#define SECURE_TRANSFER_H

#include "data_transfer.h"

class secure_transfer:public data_transfer
{
public:
	secure_transfer();
	~secure_transfer();

	//send data
	//if the receiver will echo the message to the sender,
	//set echo=true,then the function will recv and check the 
	//message echoed;if not,set echo=false
	//return how many chars it sends.
	//if error occurs,return -1
	int send(unsigned char *pbuf,int size,bool echo=false);
	//receive data
	//if the receiver need to echo the message to the sender
	//set echo=true,then the function will send the message
	//to the sender;if not,set echo=false
	//return how many chars it receives
	////if error occurs,return -1
	int recv(unsigned char *pbuf,int size,bool echo=false);
};

#endif
